Skip to main content

ID token

The ID token is a JWT unique to each session that contains the user's identity information.

The JSON representing the user's identity is signed by the partner's identity provider using the public and private keys implemented in the JWKS endpoint, thereby becoming the JWT.

To guarantee the user's identity, the ID token must be built following a specific format:

{
"sub": "{logged-in user's CPF}",
"jti": "e2e3b202-19e9-46dc-b061-c5f22eb34194",
"name": "USER NAME",
"email": "user@email.com",
"phone_number": "{user's phone number}", // e.g. 5511000000000
"exp": 1706299657,
"iss": "{base path of the jwks endpoint}", // e.g. https://id.sandbox.btgpactual.com
"aud": "btg:empresas:companies:{cnpj}"
}

In the SSO section we will go into detail on how this JSON is built.